package vn.lumi.smarthome.io.model;

public class Schedule {
	
	public static final int MAX_DEVICE_SCHDEULE = 3;
	
	private int id;
	private int device_id;
	private int state;
	private boolean repeat;
	private boolean monday;
	private boolean tuesday;
	private boolean wednesday;
	private boolean thursday;
	private boolean friday;
	private boolean saturday;
	private boolean sunday;
	private int hour;
	private int minute;
	private int hour_end;
	private int minute_end;
//	private int duration;
	private int state_id;
	private DeviceState deviceStateOfSchedule;
	
	//constants
	public static final int SCHEDULE_STATE_ON = 2;
	public static final int SCHEDULE_STATE_OFF = 1;
	public static final int SCHEDULE_DAY_ON = 1;
	public static final int SCHEDULE_DAY_OFF = 0;
	public static final int SCHEDULE_REPEAT_ON = 1;
	public static final int SCHEDULE_REPEAT_OFF = 0;
	public static final int SCHEDULE_NOT_TURNON_TYPE = 0xFF;
	public static final int SCHEDULE_NOT_TURNOFF_TYPE = 0xFF;
	
	public Schedule() {
	}

	public Schedule(int id, int device_id, int state, boolean repeat, boolean monday, boolean tuesday,
			boolean wednesday, boolean thursday, boolean friday,
			boolean saturday, boolean sunday, int hour, int minute, int hour_end,int minute_end,
			int state_id) {
		super();
		this.id = id;
		this.device_id = device_id;
		this.state = state;
		this.repeat = repeat;
		this.monday = monday;
		this.tuesday = tuesday;
		this.wednesday = wednesday;
		this.thursday = thursday;
		this.friday = friday;
		this.saturday = saturday;
		this.sunday = sunday;
		this.hour = hour;
		this.minute = minute;
//		this.duration = duration;
		this.hour_end = hour_end;
		this.minute_end = minute_end;
		this.state_id = state_id;
	}

	public interface OnControlScheduleListener{
		public void OnTurnOnSchedule(int scheduleId);
		public void OnTurnOffSchedule(int scheduleId);
	}
	
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getDevice_id() {
		return device_id;
	}

	public void setDevice_id(int device_id) {
		this.device_id = device_id;
	}

	public boolean isMonday() {
		return monday;
	}

	public void setMonday(boolean monday) {
		this.monday = monday;
	}

	public boolean isTuesday() {
		return tuesday;
	}

	public void setTuesday(boolean tuesday) {
		this.tuesday = tuesday;
	}

	public boolean isWednesday() {
		return wednesday;
	}

	public void setWednesday(boolean wednesday) {
		this.wednesday = wednesday;
	}

	public boolean isThursday() {
		return thursday;
	}

	public void setThursday(boolean thursday) {
		this.thursday = thursday;
	}

	public boolean isFriday() {
		return friday;
	}

	public void setFriday(boolean friday) {
		this.friday = friday;
	}

	public boolean isSaturday() {
		return saturday;
	}

	public void setSaturday(boolean saturday) {
		this.saturday = saturday;
	}

	public boolean isSunday() {
		return sunday;
	}

	public void setSunday(boolean sunday) {
		this.sunday = sunday;
	}

	public int getHour() {
		return this.hour;
	}

	public void setHour(int hour) {
		this.hour = hour;
	}
	
	public int getMinute(){
		return this.minute;
	}
	
	public void setMinute(int minute) {
		this.minute = minute;
	}
	
	

	public int getHour_end() {
		return hour_end;
	}

	public int getMinute_end() {
		return minute_end;
	}
	
	public void setHour_end(int hour_end) {
		this.hour_end = hour_end;
	}
	
	public void setDuration(int minute_end) {
		this.minute_end = minute_end;
	}

	public int getState_id() {
		return state_id;
	}

	public void setState_id(int state_id) {
		this.state_id = state_id;
	}
	
	
	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}
	
	public boolean getRepeat() {
		return repeat;
	}

	public void setRepeat(boolean repeat) {
		this.repeat = repeat;
	}
	
	public DeviceState getDeviceState() {
		return deviceStateOfSchedule;
	}
	public void setDeviceState(DeviceState deviceState) {
		this.deviceStateOfSchedule = deviceState;
	}
	
}
